CREATE TABLE [dbo].[TDCLAV_ADIC]
(
[CO_USUA] [dbo].[TD_VC_008] NOT NULL,
[NU_SECU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDCLAV_AD__NU_SE__108B795B] DEFAULT ((0)),
[NO_CLAV] [dbo].[TD_VC_020] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TDCLAV_AD__CO_US__117F9D94] DEFAULT (substring(suser_sname(),(1),(8))),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TDCLAV_AD__FE_US__1273C1CD] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TDCLAV_AD__CO_US__1367E606] DEFAULT (substring(suser_sname(),(1),(8))),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TDCLAV_AD__FE_US__145C0A3F] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDCLAV_ADIC] ADD CONSTRAINT [PK__TDCLAV_A__1A699AF35832119F] PRIMARY KEY CLUSTERED  ([CO_USUA], [NU_SECU]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDCLAV_ADIC] ADD CONSTRAINT [FK__TDCLAV_AD__CO_US__1F83A428] FOREIGN KEY ([CO_USUA]) REFERENCES [dbo].[TMUSUA] ([CO_USUA])
GO
GRANT SELECT ON  [dbo].[TDCLAV_ADIC] TO [public]
GRANT INSERT ON  [dbo].[TDCLAV_ADIC] TO [public]
GRANT DELETE ON  [dbo].[TDCLAV_ADIC] TO [public]
GRANT UPDATE ON  [dbo].[TDCLAV_ADIC] TO [public]
GO
